﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ComeSeeThis_MVC2.Models.aspnet_Operation>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Operations
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Operations</h2>
    <% Html.RenderPartial("SubMenu"); %>
    
    <br />
    <%: Html.ActionLink("Add Operation", "OperationAdd") %>
    <br />
    <br />

    <table>
        <tr>
            <th></th>
            <th>
                Code
            </th>
            <th>
                Name
            </th>
            <th>
                Description
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "OperationEdit", new { id=item.OperationId }) %> |
                <%: Html.ActionLink("Details", "OperationDetails", new { id = item.OperationId })%> |
                <%: Html.ActionLink("Delete", "OperationDelete", new { id = item.OperationId })%>
            </td>
            <td>
                <%: item.Code %>
            </td>
            <td>
                <%: item.Name %>
            </td>
            <td>
                <%: item.Description %>
            </td>
        </tr>
    
    <% } %>

    </table>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="BodyTagContent" runat="server">
</asp:Content>

